﻿using UnityEngine;
using System.Collections;

public class botao : MonoBehaviour {

	public Sprite img1;
	public Sprite img2;
	public GameObject bloco;
	bool jaPassou;


	// Use this for initialization
	void Start () {
		jaPassou = false;
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}


	
	void OnTriggerEnter2D(Collider2D other){
		if (!jaPassou) {
			this.GetComponent < SpriteRenderer > ().sprite = img2;
			Destroy (bloco);
			jaPassou = true;
			GameObject.FindObjectOfType<moviBola> ().ResetTempo ();
		}


	}




}
